<?php

declare(strict_types=1);

/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

use Hyperf\HttpServer\Router\Router;


Router::addGroup('/',function (){
    Router::addRoute(['GET', 'POST', 'HEAD'], '', [\App\Controller\IndexController::class, 'index']);
//推送报警图片
    Router::addRoute(['POST'], 'consumerMsgPush', [\App\Controller\IndexController::class, 'consumerMsgPush']);
});


Router::get('/favicon.ico', function () {
    return '';
});

//长链接
Router::addServer('ws', function () {
    //报警图片推送Push
    Router::get('/consumer_msg_push', 'App\Controller\WebSocket\ConsumerMsgPushController');
});
